with open("./TRANSFORMER/MyAttention/text.txt", encoding="utf-8", mode='r') as f:
    content = f.read()
    newcontent = []
    for ch in content:
        if ch!="\n":
            newcontent.append(ch)
with open("./TRANSFORMER/MyAttention/textnoenter.txt", encoding="utf-8", mode='w') as f:
    f.write(''.join(newcontent))